﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin_MasterPage.master" AutoEventWireup="true" CodeFile="DonHang.aspx.cs" Inherits="Admin_DonHang" %>

<%@ Register Assembly="ASPnetPagerV2_8" Namespace="ASPnetControls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <div>
        <span class="TieuDe">Danh sách Hóa đơn bán hàng</span><br />
        
         <asp:UpdatePanel ID="UpdatePanel1" runat="server">
     <Triggers>
     <asp:AsyncPostBackTrigger ControlID="pager" EventName="Command" />
     <asp:AsyncPostBackTrigger ControlID="btn_CapNhatTrangThai" EventName="Click" />
     </Triggers>
        <ContentTemplate>
        <div id="timkiem" style="border-bottom-style:solid; border-bottom-width:thin; background-color:#f3f3f3; color:#8B4513; font-weight:bold; margin-top:10px;">
                    Mã Đơn Hàng &nbsp;<asp:TextBox ID="txt_MaDonHang" runat="server"></asp:TextBox> &nbsp;
                     Tên khách hàng &nbsp;<asp:TextBox ID="txt_khachhang" runat="server"></asp:TextBox> &nbsp;
                    <asp:Button CssClass="button" ID="btn_timkiem" runat="server" Text="Tìm Kiếm"
                        onclick="btn_timkiem_Click" />

                            <div class="clear"></div>
                    <asp:Repeater ID="rpt_DonHang" runat="server" 
                        onitemdatabound="rpt_DonHang_ItemDataBound">
                        <HeaderTemplate>
                        <table width="100%" cellspacing="1" cellpadding="3" border="1">
                            <tr class="TieuDeTable" style="border-bottom-style:solid; border-bottom-width:medium; text-align:center; background-color:#f3f3f3;">
                                <td>STT</td>
                                <td>Mã hóa đơn</td>
                                <td>Tên khách hàng</td>
                                <td>Tên nhân viên</td>
                                <td>Ngày đặt</td>
                                <td>Ngày giao</td>
                                <td>Địa chỉ</td>
                                <td>Thành tiền</td>
                                <td>Trạng thái</td>
                                <td>Xem chi tiết</td>
                            </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                         <tr>
                            <td><asp:Label ID="lb_STT" runat="server"></asp:Label></td>
                            <td><%#Eval("MaHoaDonBanHang")%></td>
                            <td><%#Eval("TenDangNhap_NguoiMua")%></td>
                            <td><%#Eval("TenDangNhap_NhanVien") %></td>
                            <td><asp:Literal ID="lit_NgayDat" runat="server"></asp:Literal></td>
                            <td><asp:Literal ID="lit_NgayGiao" runat="server"></asp:Literal></td>
                           <%-- <td><%#Eval("NgayDat") %></td>
                            <td><%#Eval("NgayGiao") %></td>--%>
                            <td><%#Eval("DiaChiGiaoHang") %></td>
                            <td><asp:Literal ID="lit_thanhtien" runat="server"></asp:Literal></td>
                            <td><asp:DropDownList ID="dropdownlist_TrangThai" runat="server"></asp:DropDownList>
                                <asp:HiddenField ID="hf_MaDonHang" runat="server" />
                            </td>
                            <td><asp:HyperLink ID="hl_XemChiTiet" runat="server">Xem chi tiết</asp:HyperLink></td>
                        </tr> 
                        </ItemTemplate>
                        <FooterTemplate>
                        </table>
                        </FooterTemplate>
                    </asp:Repeater>
<div class="clear"></div>
        <div id="pager1">
                   
                    <!--BEGIN: phan trang-->
                                
            <cc1:PagerV2_8 ID="pager" runat="server" GeneratePagerInfoSection="False"  
                FirstClause="First" Font-Underline="False"
                                     NextClause="Next" PreviousClause="Previous" 
                oncommand="pager_Command" ForeColor="#33CC33" Width="200"/>
                
       </div>
                    
                    <!--END: phan trang--> 
                    
                    <!-- End .pagination -->
                    <div class="align-right">
                                    <asp:Button CssClass="button" ID="btn_CapNhatTrangThai" runat="server" Text="Cập nhật trạng thái" 
                                    onclick="btn_CapNhatTrangThai_Click"/>
                            </div>
            
                            
          <div class="clear"></div>
              </ContentTemplate>
     </asp:UpdatePanel>
       
 </div>
</asp:Content>

